.user-info {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px; /* 从12px减少到6px */
  padding: 4px 8px; /* 从8px 12px减少到4px 8px */
  border-radius: 8px; /* 从12px减少到8px */
  background: rgba(177, 186, 196, 0.1);
  border: 1px solid #30363d;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

.user-info:hover {
  background: rgba(177, 186, 196, 0.15);
  transform: translateY(-1px);
}

.user-avatar {
  position: relative;
  width: 24px; /* 从36px减少到24px */
  height: 24px; /* 从36px减少到24px */
  border-radius: 50%;
  background: linear-gradient(135deg, #58a6ff, #79c0ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 11px; /* 从14px减少到11px */
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); /* 减少阴影 */
}

.admin-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.avatar-letter {
  font-size: 11px; /* 从14px减少到11px */
  font-weight: 600;
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-name {
  font-size: 12px; /* 从14px减少到12px */
  font-weight: 600;
  color: #c9d1d9;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 10px; /* 从12px减少到10px */
  color: #8b949e;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #8b949e;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.dropdown-toggle:hover {
  color: #c9d1d9;
  background: rgba(177, 186, 196, 0.1);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  min-width: 280px;
  z-index: 1000;
  animation: dropdownSlide 0.2s ease-out;
  overflow: hidden;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-header {
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  display: flex;
  align-items: center;
  gap: 12px;
}

.dropdown-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #58a6ff, #79c0ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dropdown-user-info {
  flex: 1;
  min-width: 0;
}

.dropdown-username {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-email {
  font-size: 14px;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 0;
}

.dropdown-menu {
  padding: 16px 20px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.info-item {
  justify-content: space-between;
  cursor: default;
  padding: 10px 0;
}

.info-item:not(:last-child) {
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 8px;
}

.info-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.info-value {
  font-size: 13px;
  color: #334155;
  font-weight: 500;
}

.status-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.inactive {
  background: #fee2e2;
  color: #991b1b;
}

.logout-button {
  gap: 8px;
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 0;
  margin-top: 8px;
}

.logout-button:hover:not(:disabled) {
  background: #fef2f2;
  color: #b91c1c;
}

.logout-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.logout-button.loading {
  color: #6b7280;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .user-details {
    display: none;
  }
  
  .user-info {
    padding: 8px;
    gap: 0;
  }
  
  .user-dropdown {
    right: -12px;
    min-width: 260px;
  }
}

.config-button {
  gap: 8px;

/* 管理员相关样式 */
.admin-label {
  color: #ff6b6b;
  font-size: 10px;
  font-weight: 500;
  margin-left: 4px;
}

.dropdown-avatar {
  position: relative;
}

.dropdown-avatar .admin-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  font-size: 9px;
}

.role-badge {
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.role-badge.admin {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
}

.role-badge.user {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
  color: white;
}

.admin-panel-button {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  transition: all 0.2s ease;
}

.admin-panel-button:hover {
  background: linear-gradient(135deg, #5a6fd8, #6a4190);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.admin-panel-button svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 0;
  margin-bottom: 8px;
}

.config-button:hover {
  background: #f8fafc;
  color: #475569;
}

@media (max-width: 480px) {
  .user-dropdown {
    right: -20px;
    left: -20px;
    min-width: auto;
  }
} 